package org.example;

public class Main {
    public static void main(String[] args) {
        final long time1 = System.currentTimeMillis();
        long f35 = 0;
        long N = 35L;
        for (int i = 1; i <= 10; i++) {
            f35 = fb(N);
        }
        long useMs = (System.currentTimeMillis() - time1) / 10;
        System.out.println("fb(35)单次平均耗时(ms): " + useMs + " f35= " + f35);
    }

    static long fb(long N) {
        if (N == 0 || N == 1) {
            return 1L;
        } else {
            return fb(N - 1) + fb(N - 2);
        }
    }

}